package com.cskaoyan.mall.bean;

import com.cskaoyan.mall.bean.bo.BrandCreateBO;
import com.cskaoyan.mall.bean.bo.BrandUpdateBO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Brand {
    // 品牌制造商的id
    private Integer id;

    // 品牌制造商姓名
    private String name;

    // 品牌制造商简介
    private String desc;

    // 图片信息
    private String picUrl;

    // 排序依据
    private Byte sortOrder;

    // 底价
    private BigDecimal floorPrice;

    // 添加时间
    private String addTime;

    // 更新时间
    private String updateTime;

    // 是否删除
    private Boolean deleted;


    public Brand(BrandCreateBO brandCreateBO) {
        this.name = brandCreateBO.getName();
        this.desc = brandCreateBO.getDesc();
        this.floorPrice = new BigDecimal(brandCreateBO.getFloorPrice());
        this.picUrl = brandCreateBO.getPicUrl();
    }

    public Brand(BrandUpdateBO brandUpdateBO){
        this.id = brandUpdateBO.getId();
        this.name = brandUpdateBO.getName();
        this.desc = brandUpdateBO.getDesc();
        this.floorPrice = new BigDecimal(brandUpdateBO.getFloorPrice());
        this.picUrl = brandUpdateBO.getPicUrl();
    }
}